<ui:composition template="/template/template.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets">

    <ui:define name="corpo">
        <br/>
        <p:breadCrumb >  
            <p:menuitem value="#" url="#" />  
            <p:menuitem value="Paginal Principal" url="#" />  
            <p:menuitem value="Liberação de Professores" url="#" />  
        </p:breadCrumb>   
        <h:form id="form"> 
            <p:dataTable style="padding-top:2% !important;" var="docente" value="#{mbLiberacaoProfessores.lista}" widgetVar="Liberacao" 
                         emptyMessage="Não encontrado" selection="#{mbLiberacaoProfessores.docente}" rowKey="#{docente.pssfscCodigo}"
                         selectionMode="single" paginator="true" rows="10"> 
                <p:ajax event="rowSelect"  oncomplete="confirmation.show()" /> 
                <f:facet name="header" >  
                    <p:outputPanel style="margin-left:475px" >
                        <h:outputText  value="Busca por nome:" />  
                        <p:inputText id="globalFilter" onkeyup="Liberacao.filter()" style="width:150px;margin-left:5px"/>  
                    </p:outputPanel>  
                </f:facet>  
                <p:column id="model" filterBy="#{docente.pssfscNome}">  
                    <f:facet name="header">  
                        Nome  
                    </f:facet>  
                    <h:outputText value="#{docente.pssfscNome}" /> 
                </p:column>  
                <p:column filterBy="#{docente.pssfscCodigo}">  
                    <f:facet name="header">  
                        Código  
                    </f:facet>  
                    <h:outputText value="#{docente.pssfscCodigo}" />  
                </p:column>  
                <p:column filterBy="#{docente.pssfscEmail}">  
                    <f:facet name="header">  
                        Email  
                    </f:facet>  
                    <h:outputText value="#{docente.pssfscEmail}" />  
                </p:column>  
                <p:column filterBy="#{docente.strLotacao.strCodigo}">  
                    <f:facet name="header">  
                        Lotação  
                    </f:facet>  
                    <h:outputText value="#{docente.strLotacao.strCodigo}" />  
                </p:column> 

                
<!--                <p:column style="width:4%">  
                    <p:commandButton id="selectButton" action="liberacaoDeProfessores2" icon="ui-icon-search" title="View" >
                        <f:setPropertyActionListener value="#{docente}" target="#{mbLiberacaoProfessores.docente}" />  
                     </p:commandButton>  
                </p:column> -->


            </p:dataTable> 
            <p:dialog id="confirmation" widgetVar="confirmation" resizable="false" closable="false" >
                <h:outputLabel value="Deseja editar os dados do professor selecionado?" />
                <br />
                <br />
                <h:panelGroup style="padding-left: 185px">     
                    <p:commandButton value="sim" action="liberacaoDeProfessores2"/>
                    <p:commandButton value="não" onclick="confirmation.hide()"/>
                   
                </h:panelGroup>
            </p:dialog>
            <p:dataTable style="padding-bottom:2% !important;" id="basic2" var="Professores2" value=" "> 
            </p:dataTable>    
        </h:form> 
    </ui:define>
</ui:composition>

